﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using WebServer.Models;

namespace WebServer
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“ISendCode”。
    [ServiceContract]
    public interface ISendCode
    {
        #region 邮箱发送
        /// <summary>
        /// 邮件发送 0-注册验证；1找回密码
        /// </summary>
        /// <param name="Email"></param>
        /// <param name="Title"></param>
        /// <param name="Body"></param>
        /// <param name="mod"></param>
        /// <returns></returns>
        [OperationContract]
        MsgEntity SendEmail(string Email, int Type, string returnUrl);


        /// <summary>
        /// 邮件发送 0-注册验证；1找回密码
        /// </summary>
        /// <param name="Email"></param>
        /// <param name="Title"></param>
        /// <param name="Body"></param>
        /// <param name="mod"></param>
        /// <returns></returns>
        [OperationContract]
        MsgEntity TestSendEmail(string FromEmail, string PassWord, string Email, string Code);



        #endregion

        /// <summary>
        /// 手机验证码
        /// </summary>
        /// <param name="Mobile"></param>
        /// <returns></returns>
        [OperationContract]
        MsgEntity SendMobileCode(string Mobile);

         /// <summary>
        /// 发送手机通知通过审核
        /// </summary>
        /// <param name="url">请求的URL</param>
        /// <param name="param">请求的参数</param>
        /// <returns>请求结果</returns>
        [OperationContract]
        MsgEntity SendMobileInform(string Mobile, string CateName, bool IsOpen);

        
        /// <summary>
        /// 认证
        /// </summary>
        /// <param name="Email"></param>
        /// <param name="Mobile"></param>
        /// <param name="Code"></param>
        /// <returns></returns>
        [OperationContract]
        bool LoginCode(string Email, string Mobile, string Code);


        /// <summary>
        /// 验证
        /// </summary>
        /// <param name="Email"></param>
        /// <param name="Mobile"></param>
        /// <param name="Code"></param>
        /// <returns></returns>
        [OperationContract]
        bool SecurityLogin(string Email, string Mobile, string Code);
        
    }
}
